﻿using OpenIotModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IoTGateway.Model {
    [Table("DeviceVariables")]//注意Table标签
    public class DeviceVariable 
    {
        [Display(Name = "ID")]
        public string ID { get; set; }
        [Display(Name = "变量名")]
        public string Name { get; set; }

        [Display(Name = "排序")]
        public uint Index { get; set; }

        [Display(Name = "描述")]
        public string Description { get; set; }

        [Display(Name = "方法")]
        public string Method { get; set; }

        [Display(Name = "地址")]
        public string DeviceAddress { get; set; }

        [Display(Name = "类型")]
        public string DataType { get; set; }

        [Display(Name = "上传")]
        public bool IsUpload { get; set; }

        [Display(Name = "设备")]
        public string DeviceId { get; set; }

        [Display(Name = "值")]
        [NotMapped]
        public object Value { get; set; }

    }
}